<?xml version="1.0" encoding="iso-8859-1" standalone="no"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
  <head>
    <meta http-equiv="Content-Type" content=
    "application/xhtml+xml; charset=iso-8859-1" />
    <title>
      SQLite-3.31.1
    </title>
    <link rel="stylesheet" type="text/css" href="../stylesheets/lfs.css" />
    <meta name="generator" content="DocBook XSL Stylesheets V1.79.1" />
    <link rel="stylesheet" href="../stylesheets/lfs-print.css" type=
    "text/css" media="print" />
  </head>
  <body class="blfs" id="blfs-9.1">
    <div class="navheader">
      <h4>
        Beyond Linux<sup>�</sup> From Scratch <span class="phrase">(System
        V</span> Edition) - Version 9.1
      </h4>
      <h3>
        Chapter&nbsp;22.&nbsp;Databases
      </h3>
      <ul>
        <li class="prev">
          <a accesskey="p" href="postgresql.html" title=
          "PostgreSQL-12.2">Prev</a>
          <p>
            PostgreSQL-12.2
          </p>
        </li>
        <li class="next">
          <a accesskey="n" href="other.html" title=
          "Other Server Software">Next</a>
          <p>
            Other Server Software
          </p>
        </li>
        <li class="up">
          <a accesskey="u" href="databases.html" title=
          "Chapter&nbsp;22.&nbsp;Databases">Up</a>
        </li>
        <li class="home">
          <a accesskey="h" href="../index.html" title=
          "Beyond Linux� From Scratch     (System V Edition) - Version 9.1">Home</a>
        </li>
      </ul>
    </div>
    <div class="sect1" lang="en" xml:lang="en">
      <h1 class="sect1">
        <a id="sqlite" name="sqlite"></a>SQLite-3.31.1
      </h1>
      <div class="package" lang="en" xml:lang="en">
        <h2 class="sect2">
          Introduction to SQLite
        </h2>
        <p>
          The <span class="application">SQLite</span> package is a software
          library that implements a self-contained, serverless,
          zero-configuration, transactional SQL database engine.
        </p>
        <p>
          This package is known to build and work properly using an LFS-9.1
          platform.
        </p>
        <h3>
          Package Information
        </h3>
        <div class="itemizedlist">
          <ul class="compact">
            <li class="listitem">
              <p>
                Download (HTTP): <a class="ulink" href=
                "https://sqlite.org/2020/sqlite-autoconf-3310100.tar.gz">https://sqlite.org/2020/sqlite-autoconf-3310100.tar.gz</a>
              </p>
            </li>
            <li class="listitem">
              <p>
                Download MD5 sum: 2d0a553534c521504e3ac3ad3b90f125
              </p>
            </li>
            <li class="listitem">
              <p>
                Download size: 2.8 MB
              </p>
            </li>
            <li class="listitem">
              <p>
                Estimated disk space required: 74 MB
              </p>
            </li>
            <li class="listitem">
              <p>
                Estimated build time: 0.4 SBU (Using parallelism=4)
              </p>
            </li>
          </ul>
        </div>
        <h3>
          Additional Downloads
        </h3>
        <div class="itemizedlist">
          <p class="title">
            <strong>Optional Documentation</strong>
          </p>
          <ul class="compact">
            <li class="listitem">
              <p>
                Download (HTTP): <a class="ulink" href=
                "https://sqlite.org/2020/sqlite-doc-3310100.zip">https://sqlite.org/2020/sqlite-doc-3310100.zip</a>
              </p>
            </li>
            <li class="listitem">
              <p>
                Download MD5 sum: c2417ed8e5c33aafcc6cc36682276e88
              </p>
            </li>
            <li class="listitem">
              <p>
                Download size: 9.2 MB
              </p>
            </li>
          </ul>
        </div>
        <h3>
          SQLite Dependencies
        </h3>
        <h4>
          Optional
        </h4>
        <p class="optional">
          <a class="ulink" href=
          "http://www.thrysoee.dk/editline/">libedit</a> and <a class="xref"
          href="../general/unzip.html" title="UnZip-6.0">UnZip-6.0</a>
          (required to unzip the documentation)
        </p>
        <p class="usernotes">
          User Notes: <a class="ulink" href=
          "http://wiki.linuxfromscratch.org/blfs/wiki/sqlite">http://wiki.linuxfromscratch.org/blfs/wiki/sqlite</a>
        </p>
      </div>
      <div class="installation" lang="en" xml:lang="en">
        <h2 class="sect2">
          Installation of SQLite
        </h2>
        <p>
          If you downloaded the optional documentation, issue the following
          command to install the documentation into the source tree:
        </p>
        <pre class="userinput">
<kbd class="command">unzip -q ../sqlite-doc-3310100.zip</kbd>
</pre>
        <p>
          Install <span class="application">SQLite</span> by running the
          following commands:
        </p>
        <pre class="userinput">
<kbd class="command">./configure --prefix=/usr     \
            --disable-static  \
            --enable-fts5     \
            CFLAGS="-g -O2                    \
            -DSQLITE_ENABLE_FTS3=1            \
            -DSQLITE_ENABLE_FTS4=1            \
            -DSQLITE_ENABLE_COLUMN_METADATA=1 \
            -DSQLITE_ENABLE_UNLOCK_NOTIFY=1   \
            -DSQLITE_ENABLE_DBSTAT_VTAB=1     \
            -DSQLITE_SECURE_DELETE=1          \
            -DSQLITE_ENABLE_FTS3_TOKENIZER=1" &amp;&amp;
make</kbd>
</pre>
        <p>
          This package does not come with a test suite.
        </p>
        <p>
          Now, as the <code class="systemitem">root</code> user:
        </p>
        <pre class="root">
<kbd class="command">make install</kbd>
</pre>
        <p>
          If you downloaded the optional documentation, issue the following
          commands as the <code class="systemitem">root</code> user to
          install it:
        </p>
        <pre class="root">
<kbd class=
"command">install -v -m755 -d /usr/share/doc/sqlite-3.31.1 &amp;&amp;
cp -v -R sqlite-doc-3310100/* /usr/share/doc/sqlite-3.31.1</kbd>
</pre>
      </div>
      <div class="commands" lang="en" xml:lang="en">
        <h2 class="sect2">
          Command Explanations
        </h2>
        <p>
          <em class="parameter"><code>--disable-static</code></em>: This
          switch prevents installation of static versions of the libraries.
        </p>
        <p>
          <em class="parameter"><code>--enable-fts5</code></em>: enable
          version 5 of the full text search extension.
        </p>
        <p>
          <em class="parameter"><code>CFLAGS="-g -O2 -DSQLITE_ENABLE_FTS3=1
          -DSQLITE_ENABLE_FTS3_TOKENIZER=1 -DSQLITE_ENABLE_FTS4=1
          -DSQLITE_ENABLE_COLUMN_METADATA=1 -DSQLITE_SECURE_DELETE
          -DSQLITE_ENABLE_UNLOCK_NOTIFY=1
          -DSQLITE_ENABLE_DBSTAT_VTAB=1"</code></em>: Applications such as
          <span class="application">Firefox</span> require secure delete and
          enable unlock notify to be turned on. Since <span class=
          "application">firefox-41</span> the dbstat virtual table and FTS3/4
          are also required. The only way to do this is to include them in
          the CFLAGS. Also, since <span class=
          "application">Thunderbird-52.5.0</span>, the dual-argument FTS3
          tokenizer is required. By default, these are set to <code class=
          "literal">"-g -O2"</code> so we specify that to preserve those
          settings. You may, of course, wish to omit the <code class=
          "literal">'-g'</code> if you do not wish to create debugging
          information. For further information on what can be specified see
          <a class="ulink" href=
          "http://www.sqlite.org/compile.html">http://www.sqlite.org/compile.html</a>.
        </p>
      </div>
      <div class="content" lang="en" xml:lang="en">
        <h2 class="sect2">
          Contents
        </h2>
        <div class="segmentedlist">
          <div class="seglistitem">
            <div class="seg">
              <strong class="segtitle">Installed Program:</strong>
              <span class="segbody">sqlite3</span>
            </div>
            <div class="seg">
              <strong class="segtitle">Installed Library:</strong>
              <span class="segbody">libsqlite3.so</span>
            </div>
            <div class="seg">
              <strong class="segtitle">Installed Directory:</strong>
              <span class="segbody">/usr/share/doc/sqlite-3.31.1</span>
            </div>
          </div>
        </div>
        <div class="variablelist">
          <h3>
            Short Descriptions
          </h3>
          <table border="0" class="variablelist">
            <colgroup>
              <col align="left" valign="top" />
              <col />
            </colgroup>
            <tbody>
              <tr>
                <td>
                  <p>
                    <a id="sqlite3" name="sqlite3"></a><span class=
                    "term"><span class=
                    "command"><strong>sqlite3</strong></span></span>
                  </p>
                </td>
                <td>
                  <p>
                    A terminal-based front-end to the <span class=
                    "application">SQLite</span> library that can evaluate
                    queries interactively and display the results.
                  </p>
                </td>
              </tr>
              <tr>
                <td>
                  <p>
                    <a id="libsqlite3" name="libsqlite3"></a><span class=
                    "term"><code class="filename">libsqlite3.so</code></span>
                  </p>
                </td>
                <td>
                  <p>
                    contains the <span class="application">SQLite</span> API
                    functions.
                  </p>
                </td>
              </tr>
            </tbody>
          </table>
        </div>
      </div>
      <p class="updated">
        Last updated on 2020-02-15 08:54:30 -0800
      </p>
    </div>
    <div class="navfooter">
      <ul>
        <li class="prev">
          <a accesskey="p" href="postgresql.html" title=
          "PostgreSQL-12.2">Prev</a>
          <p>
            PostgreSQL-12.2
          </p>
        </li>
        <li class="next">
          <a accesskey="n" href="other.html" title=
          "Other Server Software">Next</a>
          <p>
            Other Server Software
          </p>
        </li>
        <li class="up">
          <a accesskey="u" href="databases.html" title=
          "Chapter&nbsp;22.&nbsp;Databases">Up</a>
        </li>
        <li class="home">
          <a accesskey="h" href="../index.html" title=
          "Beyond Linux� From Scratch     (System V Edition) - Version 9.1">Home</a>
        </li>
      </ul>
    </div>
  </body>
</html>
